/* 知识点详情页面样式 */
.knowledge-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.knowledge-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.mastery-display {
    text-align: center;
    padding: 2rem 0;
}

.mastery-circle {
    width: 120px;
    height: 120px;
    position: relative;
    margin: 0 auto 1rem;
}

.mastery-circle svg {
    width: 100%;
    height: 100%;
}

.mastery-progress {
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.5s ease-in-out;
    stroke-linecap: round;
}

.mastery-circle span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    z-index: 2;
}

.mastery-info {
    text-align: center;
}

.mastery-level {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mastery-label {
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 内容卡片 */
.content-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 练习记录表格 */
.practice-table {
    width: 100%;
    border-collapse: collapse;
}

.practice-table th,
.practice-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.practice-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.practice-table tr:hover {
    background: #f8f9fa;
}

.result-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.bg-correct { background: #d4edda; color: #155724; }
.bg-incorrect { background: #f8d7da; color: #721c24; }
.bg-partial { background: #fff3cd; color: #856404; }

/* 关联知识点 */
.related-knowledge {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.related-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    border-left: 4px solid;
    transition: all 0.3s ease;
    cursor: pointer;
}

.related-item:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.related-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
}

/* 边际收益指示器 */
.marginal-gain {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.gain-indicator {
    width: 80px;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gain-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gain-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.gain-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 学习建议 */
.suggestion-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.suggestion-desc {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
    max-height: 3em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.suggestion-item.expanded .suggestion-desc {
    max-height: 500px;
}

/* 颜色定义 */
.bg-excellent { background: linear-gradient(135deg, #28a745, #20c997); }
.bg-good { background: linear-gradient(135deg, #17a2b8, #6f42c1); }
.bg-average { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.bg-poor { background: linear-gradient(135deg, #dc3545, #e83e8c); }

.text-excellent { color: #28a745; }
.text-good { color: #17a2b8; }
.text-average { color: #ffc107; }
.text-poor { color: #dc3545; }

.border-excellent { border-left-color: #28a745; }
.border-good { border-left-color: #17a2b8; }
.border-average { border-left-color: #ffc107; }
.border-poor { border-left-color: #dc3545; }

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 进度条动画 */
.progress-bar {
    transition: width 1s ease-in-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .mastery-circle {
        width: 100px;
        height: 100px;
    }

    .mastery-circle span {
        font-size: 1.25rem;
    }

    .related-knowledge {
        grid-template-columns: 1fr;
    }

    .practice-table {
        font-size: 0.875rem;
    }

    .card-header {
        flex-direction: column;
        align-items: start;
        gap: 1rem;
    }
}

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: white !important;
}

.breadcrumb-item.active {
    color: white !important;
}

/* 筛选按钮 */
.practice-filter.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 工具提示 */
.tooltip-item {
    position: relative;
    cursor: help;
}

.tooltip-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}